﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<%set string category_title=get_category_title(model.category_id,"资源下载")%>
<title>{model.title} - {category_title} - {site.name}</title>
<meta name="keywords" content="{model.seo_keywords}" />
<meta name="description" content="{model.seo_description}" />
<link href="<%templateskin%>/css/style.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="{config.webpath}scripts/artdialog/ui-dialog.css" />
<script type="text/javascript" charset="utf-8" src="{config.webpath}scripts/jquery/jquery-1.11.2.min.js"></script>
<script type="text/javascript" charset="utf-8" src="{config.webpath}scripts/artdialog/dialog-plus-min.js"></script>
<script type="text/javascript" charset="utf-8" src="<%templateskin%>/js/common.js"></script>
</head>

<body>
<!--Header-->
<%template src="_header.html"%>
<!--/Header-->

<div class="section clearfix">
  <!--右边-->
  <div class="list-right">
    <div class="sidebar-box">
      <div class="line30"></div>
      <h3>资源类别</h3>
      <ul class="navbar">
        <%set DataTable categoryList1=get_category_child_list(channel, 0)%>
        <%foreach(DataRow cdr1 in categoryList1.Rows)%>
        <li>
          <h4><a href="<%linkurl("down_list",{cdr1[id]})%>">{cdr1[title]}</a></h4>
          <p>
            <%set DataTable categoryList2=get_category_child_list(channel, {strtoint({cdr1[id]})})%>
            <%foreach(DataRow cdr2 in categoryList2.Rows)%>
            <%if({strtoint({cdr2[id]})}=={model.category_id})%>
            <a href="<%linkurl("down_list",{cdr2[id]})%>" class="selected">{cdr2[title]}</a>
            <%else%>
            <a href="<%linkurl("down_list",{cdr2[id]})%>">{cdr2[title]}</a>
            <%/if%>
            <%/foreach%>
          </p>
        </li>
        <%/foreach%>
      </ul>
      <div class="line20"></div>
      <h3>推荐资源</h3>
      <div class="focus-list">
        <ul>
          <%set DataTable redDown=get_article_list(channel, 0, 4, "status=0 and is_red=1")%>
          <%foreach(DataRow dr in redDown.Rows)%>
          <li>
            <a title="{dr[title]}" href="<%linkurl("down_show",{dr[id]})%>">
              <b><img src="{dr[img_url]}" /></b>
              <span>{dr[title]}</span>
            </a>
          </li>
          <%/foreach%>
        </ul>
      </div>
      <div class="line10"></div>
      <h3>人气排行</h3>
      <ul class="rank-list">
        <%set DataTable hotDown=get_article_list(channel, 0, 10, "status=0", "click desc,id desc")%>
        <%loop hotdr hotDown%>
        <%if(hotdr__loop__id==1)%>
        <li class="active">
        <%else%>
        <li>
        <%/if%>
          <span><%datetostr({hotdr[add_time]},MM-dd)%></span>
          <i class="num"><%=hotdr__loop__id%></i><a href="<%linkurl("down_show",{hotdr[id]})%>">{hotdr[title]}</a>
        </li>
        <%/loop%>
      </ul>
    </div>
  </div>
  <!--/右边-->
  
  <!--左边-->
  <div class="list-auto">
    
    <div class="meta">
      <h1>{model.title}</h1>
      <p class="meta-info">
        <span class="time">{model.add_time}</span>
        <span class="comm"><script type="text/javascript" src="{config.webpath}tools/submit_ajax.ashx?action=view_comment_count&id={model.id}"></script>人评论</span>
        <span class="view"><script type="text/javascript" src="{config.webpath}tools/submit_ajax.ashx?action=view_article_click&id={model.id}&click=1"></script>次浏览</span>
        分类：{category_title}
      </p>
    </div>
    
    <div class="entry">
      {model.content}
    </div>
    
    <!--分享-->
    <%template src=/_share_js.html/%>
    <!--/分享-->
    <div class="line15"></div>
    
    <!--附件列表-->
    <h2 class="base-tit">
      <span>附件下载</span>
    </h2>
    <ul class="attach-list">
      <%if(model.attach!=null)%>
      <%foreach(DTcms.Model.article_attach modelt in model.attach)%>
      <li>
        <span><a href="javascript:;" onclick="downLink({modelt.point},'{config.webpath}tools/download.ashx?site={site.build_path}&id={modelt.id}');">点击下载</a></span>
        附件：{modelt.file_name}
        <i>大小：
          <%if {modelt.file_size}>1024%>
            <%csharp%>
            string tempSize = (modelt.file_size/1024f).ToString("#.##");
            <%/csharp%>
            {tempSize}MB
          <%else%>
            {modelt.file_size}KB
          <%/if%>
        </i>
        <i>下载：<script type="text/javascript" src="{config.webpath}tools/submit_ajax.ashx?action=view_attach_count&id={modelt.id}"></script>次</i>
        <i>所需积分：{modelt.point}分</i>
      </li>
      <%/foreach%>
      <%/if%>
    </ul>
    <!--/附件列表-->
    
    <div class="line15"></div>
    <!--相关推荐-->
    <h2 class="base-tit">
      <span>相关资源</span>
    </h2>
    <div class="rel-list">
      <ul>
        <%set DataTable relList=get_article_list(channel, model.category_id, 4, "is_red=1 and id<>"+model.id)%>
        <%foreach(DataRow dr in relList.Rows)%>
        <li>
          <div class="img-box">
            <a title="{dr[title]}" href="<%linkurl("down_show",{dr[id]})%>">
              <img src="{dr[img_url]}" />
            </a>
          </div>
          <div class="info">
            <h3><a title="{dr[title]}" href="<%linkurl("down_show",{dr[id]})%>">{dr[title]}</a></h3>
            <p>{dr[zhaiyao]}</p>
            <span>{dr[add_time]}</span>
          </div>
        </li>
        <%/foreach%>
        <%if(relList.Rows.Count<1)%>
        <div class="nodata">暂无相关的资源...</div>
        <%/if%>
      </ul>
    </div>
    <!--/相关推荐-->
    <div class="clear"></div>
    
    <!--用户评论-->
    <%if(model.is_msg==1)%>
    <h2 class="base-tit">
      <i>共有<b><script type="text/javascript" src="{config.webpath}tools/submit_ajax.ashx?action=view_comment_count&id={model.id}"></script></b>访客发表了评论</i>
      <span>网友评论</span>
    </h2>
    <%template src="_comment_box.html"%>
    <%/if%>
    <!--用户评论-->
    
  </div>
  <!--/左边-->
  
</div>

<!--Footer-->
<%template src="_footer.html"%>
<!--/Footer-->
</body>
</html>